﻿<local:MyPage 
    x:Class="ConstellationShow.Pages.Select"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:local="clr-namespace:ConstellationShow"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True">

    <local:MyPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" BackgroundColor="#FF7F49D1">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" Click="Click_Ok" IconUri="/Images/i_ok.png" Text="完成"/>
        </shell:ApplicationBar>
    </local:MyPage.ApplicationBar>
    
    <local:MyPage.Resources>
        <local:DataStr x:Key="DataStr"/>
        <local:DataStr2 x:Key="DataStr2"/>
		<Style x:Key="ButtonStyle2" TargetType="Button">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
			<Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
			<Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
			<Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
			<Setter Property="Padding" Value="10,3,10,5"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid Background="Transparent">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
												<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
											</ObjectAnimationUsingKeyFrames>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
												<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="ButtonBackground"  BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="5,6,7,6" BorderBrush="#FFC7C6E7">
								<Canvas>
                                    <TextBlock x:Name="ContentContainer" 
                                               Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=Content,Converter={StaticResource DataStr}}"
                                               Foreground="#FF2F0197" FontSize="33.333" Width="294" Canvas.Left="98" Canvas.Top="2"/>
										<TextBlock Canvas.Left="8" TextWrapping="Wrap" Text="{TemplateBinding Tag}" Canvas.Top="4" FontSize="33.333" Foreground="#FF2F0197"/>
								</Canvas>
							</Border>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

        <Style x:Key="ButtonStyle3" TargetType="Button">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="BorderBrush" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
            <Setter Property="BorderThickness" Value="{StaticResource PhoneBorderThickness}"/>
            <Setter Property="FontFamily" Value="{StaticResource PhoneFontFamilySemiBold}"/>
            <Setter Property="FontSize" Value="{StaticResource PhoneFontSizeMediumLarge}"/>
            <Setter Property="Padding" Value="10,3,10,5"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid Background="Transparent">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneBackgroundBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneForegroundBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="ButtonBackground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="ButtonBackground"  BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="0" Margin="5,6,7,6" BorderBrush="#FFC7C6E7">
                                <Canvas>
                                    <TextBlock x:Name="ContentContainer" 
                                               Text="{Binding RelativeSource={RelativeSource TemplatedParent},Path=Content,Converter={StaticResource DataStr2}}"
                                               Foreground="#FF2F0197" FontSize="33.333" Width="294" Canvas.Left="98" Canvas.Top="2"/>
                                    <TextBlock Canvas.Left="8" TextWrapping="Wrap" Text="{TemplateBinding Tag}" Canvas.Top="4" FontSize="33.333" Foreground="#FF2F0197"/>
                                </Canvas>
                            </Border>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        
        <Style x:Key="DatePickerStyle1" TargetType="toolkit:DatePicker">
			<Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
			<Setter Property="BorderThickness" Value="0"/>
			<Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="PickerPageUri" Value="/Microsoft.Phone.Controls.Toolkit;component/DateTimePickers/DatePickerPage.xaml"/>
			<Setter Property="ValueStringFormat" Value="{}{0:d}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="toolkit:DatePicker">
						<StackPanel>
							<ContentControl
								Content="{TemplateBinding Header}"
								ContentTemplate="{TemplateBinding HeaderTemplate}"
								Foreground="{StaticResource PhoneSubtleBrush}"
								HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
								Margin="12,0,12,-4"/>
							<Button
							Tag="{TemplateBinding Tag}"
								x:Name="DateTimeButton"
								Content="{TemplateBinding ValueString}"
								Background="{TemplateBinding Background}"
								BorderThickness="{TemplateBinding BorderThickness}"
								FontFamily="{TemplateBinding FontFamily}"
								Foreground="{TemplateBinding Foreground}"
								Height="72"
								HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Style="{StaticResource ButtonStyle2}"/>
						</StackPanel>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>

        <Style x:Key="DatePickerStyle2" TargetType="toolkit:DatePicker">
            <Setter Property="Background" Value="{StaticResource PhoneTextBoxBrush}"/>
            <Setter Property="BorderThickness" Value="0"/>
            <Setter Property="Foreground" Value="{StaticResource PhoneTextBoxForegroundBrush}"/>
            <Setter Property="HorizontalContentAlignment" Value="Left"/>
            <Setter Property="PickerPageUri" Value="/Microsoft.Phone.Controls.Toolkit;component/DateTimePickers/DatePickerPage.xaml"/>
            <Setter Property="ValueStringFormat" Value="{}{0:d}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="toolkit:DatePicker">
                        <StackPanel>
                            <ContentControl
								Content="{TemplateBinding Header}"
								ContentTemplate="{TemplateBinding HeaderTemplate}"
								Foreground="{StaticResource PhoneSubtleBrush}"
								HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
								Margin="12,0,12,-4"/>
                            <Button
							Tag="{TemplateBinding Tag}"
								x:Name="DateTimeButton"
								Content="{TemplateBinding ValueString}"
								Background="{TemplateBinding Background}"
								BorderThickness="{TemplateBinding BorderThickness}"
								FontFamily="{TemplateBinding FontFamily}"
								Foreground="{TemplateBinding Foreground}"
								Height="72"
								HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Style="{StaticResource ButtonStyle3}"/>
                        </StackPanel>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </local:MyPage.Resources>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush Stretch="Fill" ImageSource="/Images/blackground.jpg"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" MinHeight="81"/>
            <RowDefinition/>
        </Grid.RowDefinitions>

        <!--TitlePanel 包含应用程序的名称和页标题-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,32,0,-15" Height="64">
        	<TextBlock x:Name="PageTitle" Text="查询星座" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" FontSize="46.667" Foreground="#FF6624C1"/>
        </StackPanel>

        <!--ContentPanel - 在此处放置其他内容-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="16,15,8,-18">
        	<TextBlock HorizontalAlignment="Left" Margin="36,13,0,0" TextWrapping="Wrap" Text="按你的出生年月输入" VerticalAlignment="Top" Foreground="Black" FontSize="22.667"/>
            <toolkit:DatePicker Name="d1" ValueChanged="DatePicker_ValueChanged" Tag="阳历：" Margin="17,47,23,0" Height="70" VerticalAlignment="Top" BorderThickness="2" BorderBrush="Black" Style="{StaticResource DatePickerStyle1}" />
        	<Grid Margin="27,222,37,205">
        		<TextBlock HorizontalAlignment="Left" Margin="8,8,0,0" TextWrapping="Wrap" Text="星期：" VerticalAlignment="Top" Foreground="Black" FontSize="22.667" Width="79" Height="30" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"/>
        		<TextBlock Margin="8,44,0,0" TextWrapping="Wrap" Text="星座：" Foreground="Black" FontSize="22.667" HorizontalAlignment="Left" Width="80" VerticalAlignment="Top"/>
        		<TextBlock HorizontalAlignment="Left" Margin="9,80,0,0" TextWrapping="Wrap" Text="守护星：" VerticalAlignment="Top" Foreground="Black" FontSize="22.667" Width="99"/>
        		<TextBlock HorizontalAlignment="Left" Margin="8,117,0,0" TextWrapping="Wrap" Text="守护神：" Foreground="Black" FontSize="22.667" Width="99" VerticalAlignment="Top"/>
        		<TextBlock HorizontalAlignment="Left" Margin="9,154,0,0" TextWrapping="Wrap" Text="属性：" Foreground="Black" FontSize="22.667" Width="79" VerticalAlignment="Top" d:LayoutOverrides="HorizontalAlignment"/>
        		<TextBlock x:Name="txt1" HorizontalAlignment="Left" Margin="74,8,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="Black" FontSize="22.667" Height="30" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment"/>
        		<TextBlock x:Name="txt2" Margin="74,44,0,0" TextWrapping="Wrap" Foreground="Black" FontSize="22.667" HorizontalAlignment="Left" VerticalAlignment="Top"/>
        		<TextBlock x:Name="txt3" Margin="99,80,185,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="Black" FontSize="22.667"/>
        		<TextBlock x:Name="txt4" Margin="100,117,0,0" TextWrapping="Wrap" Foreground="Black" FontSize="22.667" VerticalAlignment="Top"/>
        		<TextBlock x:Name="txt5" HorizontalAlignment="Left" Margin="75,154,0,0" TextWrapping="Wrap" Foreground="Black" FontSize="22.667" VerticalAlignment="Top" d:LayoutOverrides="HorizontalAlignment"/>
        	</Grid>
        	<Image x:Name="img" Height="165" Margin="89,0,109,51" Source="/Images/1.png" Stretch="Fill" VerticalAlignment="Bottom" Width="258"/>
        	<toolkit:DatePicker Name="d2" ValueChanged="DatePicker_ValueChanged_1" Tag="农历："
                                Margin="17,130,23,0" Height="70" VerticalAlignment="Top" BorderThickness="2" 
                                BorderBrush="Black" 
                                Style="{StaticResource DatePickerStyle2}" /></Grid>
    
    </Grid>
 
</local:MyPage>
